package com.gaohe.official.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.official.mapper.FmCommunitySchoolMapper;
import com.gaohe.official.domain.FmCommunitySchool;
import com.gaohe.official.service.IFmCommunitySchoolService;

/**
 * 圈子校区Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmCommunitySchoolServiceImpl implements IFmCommunitySchoolService 
{
    @Autowired
    private FmCommunitySchoolMapper fmCommunitySchoolMapper;

    /**
     * 查询圈子校区
     * 
     * @param communitySchoolId 圈子校区主键
     * @return 圈子校区
     */
    @Override
    public FmCommunitySchool selectFmCommunitySchoolByCommunitySchoolId(Long communitySchoolId)
    {
        return fmCommunitySchoolMapper.selectFmCommunitySchoolByCommunitySchoolId(communitySchoolId);
    }

    /**
     * 查询圈子校区列表
     * 
     * @param fmCommunitySchool 圈子校区
     * @return 圈子校区
     */
    @Override
    public List<FmCommunitySchool> selectFmCommunitySchoolList(FmCommunitySchool fmCommunitySchool)
    {
        return fmCommunitySchoolMapper.selectFmCommunitySchoolList(fmCommunitySchool);
    }

    /**
     * 新增圈子校区
     * 
     * @param fmCommunitySchool 圈子校区
     * @return 结果
     */
    @Override
    public int insertFmCommunitySchool(FmCommunitySchool fmCommunitySchool)
    {
        fmCommunitySchool.setCreateTime(DateUtils.getNowDate());
        return fmCommunitySchoolMapper.insertFmCommunitySchool(fmCommunitySchool);
    }

    /**
     * 修改圈子校区
     * 
     * @param fmCommunitySchool 圈子校区
     * @return 结果
     */
    @Override
    public int updateFmCommunitySchool(FmCommunitySchool fmCommunitySchool)
    {
        fmCommunitySchool.setUpdateTime(DateUtils.getNowDate());
        return fmCommunitySchoolMapper.updateFmCommunitySchool(fmCommunitySchool);
    }

    /**
     * 批量删除圈子校区
     * 
     * @param communitySchoolIds 需要删除的圈子校区主键
     * @return 结果
     */
    @Override
    public int deleteFmCommunitySchoolByCommunitySchoolIds(Long[] communitySchoolIds)
    {
        return fmCommunitySchoolMapper.deleteFmCommunitySchoolByCommunitySchoolIds(communitySchoolIds);
    }

    /**
     * 删除圈子校区信息
     * 
     * @param communitySchoolId 圈子校区主键
     * @return 结果
     */
    @Override
    public int deleteFmCommunitySchoolByCommunitySchoolId(Long communitySchoolId)
    {
        return fmCommunitySchoolMapper.deleteFmCommunitySchoolByCommunitySchoolId(communitySchoolId);
    }
}
